package com.toice.springcloud;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

//消费者 运行方式80可省略  例：localhost/consumer/dept/list
//Ribbon 和 Eureka 整合后，客户端可直接调用，不用关心Ip地址和端口号，会在定义的多个地址中随机选择
@SpringBootApplication
@EnableEurekaClient //在服务启动后，自动注册到Eureka注册中心中
//在微服务启动的时候就能去加载我们自定义Ribbon配置的负载均衡类，自定义为跳转5次切换节点
//@RibbonClient(name="SPRINGCLOUD-PROVIDER-DEPT",configuration = RuleConfig.class)
@EnableFeignClients(basePackages = {"com.toice.springcloud"}) //Feign被扫描到
public class DeptConsumer_feign {
    public static void main(String[] args) {
        SpringApplication.run(DeptConsumer_feign.class, args);
    }
}


